package com.lantosec.hmrp.modules.archives.entity;

import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.archives.vo.UserMarriageVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 领导干部婚姻变化情况报告表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserMarriage extends BaseEntity<UserMarriageVO> {

    private static final long serialVersionUID = 1L;
    public UserMarriage(UserMarriageVO vo){
        this.userMarriageId = vo.getUserMarriageId();
        this.userId = vo.getUserId();
        this.mateName = vo.getMateName();
        this.mateUnit = vo.getMateUnit();
        this.mateDuty = vo.getMateDuty();
        this.matePoliticalStatus = vo.getMatePoliticalStatus();
        this.marryStart = vo.getMarryStart();
        this.marryEnd = vo.getMarryEnd();
        this.otherRemark = vo.getOtherRemark();
        this.createId = vo.getCreateId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.verifyId = vo.getVerifyId();
        this.verifyUser = vo.getVerifyUser();
        this.verifyTime = vo.getVerifyTime();
        this.verifyStatus = vo.getVerifyStatus();
    }

    @Override
    public UserMarriageVO convertToVO(){
        return new UserMarriageVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "user_marriage_id", type = IdType.ASSIGN_UUID)
    private String userMarriageId;

    /**
     * user主表ID
     */
    private String userId;

    /**
     * 配偶名称
     */
    private String mateName;

    /**
     * 配偶单位
     */
    private String mateUnit;

    /**
     * 配偶职务
     */
    private String mateDuty;

    /**
     * 配偶政治面貌，字典值
     */
    private String matePoliticalStatus;

    /**
     * 婚姻登记时间
     */
    private String marryStart;

    /**
     * 婚姻结束时间
     */
    private String marryEnd;

    /**
     * 其他需要说明情况
     */
    private String otherRemark;

    /**
     * 创建人ID
     */
    private String createId;

    /**
     * 创建人姓名
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 审核人ID
     */
    private String verifyId;

    /**
     * 审核人姓名
     */
    private String verifyUser;

    /**
     * 审核时间
     */
    private Date verifyTime;

    /**
     * 审核状态（0：未审核，1：以审核）
     */
    private Integer verifyStatus;


    public enum ColName {
        user_marriage_id, user_id, mate_name, mate_unit, mate_duty, mate_political_status, marry_start, marry_end, other_remark, create_id, create_user, create_time, verify_id, verify_user, verify_time, verify_status, 
    }
}
